<template>
  <section>
    <div class="barmain">
      <div class="title" style="-webkit-app-region: drag">XX系统</div>
      <div class="cltrolls">
        <span @click="viewMin"><i class="el-icon-minus"></i></span>
        <span @click="viewMax" v-if="$route.meta.level"><i class="el-icon-plus"></i></span>
        <span @click="viewClose"><i class="el-icon-back"></i></span>
      </div>
    </div>
  </section>
</template>

<script>
const ipcRenderer = require('electron').ipcRenderer
export default {
  name: 'bar',
  data () {
    return {
      cartOut: false,
      reconciliat: false,
      login_info: {},
      query_info: {
        device: 'casher',
        v: 'v1.0',
        sign: 'IrfrobPfgK'
      },
      outInfos: {}
    }
  },
  mounted () {
    // this.login_info = JSON.parse(localStorage.getItem('login_info'))
  },
  methods: {
    init () {
    },
    viewMin () {
      // ipcRenderer.send('min')
    },
    viewMax () {
      ipcRenderer.send('max')
    },
    viewClose () {
      this.jump({name: 'index'})
      // if (this.$route.meta.level) {
      //   // this.cartOut = true
      // } else {
      //   ipcRenderer.send('close')
      // }
    }
  }
}
</script>
<style scoped>
.barmain{
  padding: 10px;
  display: flex;
  justify-content: space-between;
}
.title{
  flex-basis: 80%;
}
.cltrolls{
  flex-basis: 20px;
  flex: inherit;
  justify-content: space-between;
}
</style>

